<!--Copyright (C) Kherty.  All rights reserved.-->
<ResourceDictionary
    x:Class="OpenLS.Chart.UI.ChartAreaPropertiesResources"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:chartui="clr-namespace:OpenLS.Chart.UI"
    xmlns:chart="http://schemas.Kherty.com/office/2007/chart"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:drawing2="clr-namespace:OpenLS.Drawing.UI;assembly=OpenLS.Drawing.UI"
    xmlns:drawing="http://schemas.Kherty.com/office/2007/drawing"
    xmlns:Internals="clr-namespace:OpenLS.Chart.UI.Internals">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <drawing:ColorResources/>
                <drawing:FillResources/>
                <chartui:View3DResources/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>

    </ResourceDictionary.MergedDictionaries>
    <DataTemplate DataType="{x:Type chart:ChartArea}" >
        <TabControl TabStripPlacement="Left" chartui:ChartElement.ChartArea="{Binding}"  chartui:ChartElement.ViewModel="{Binding Converter={x:Static Internals:ChartConverters.ViewModelFactory}}">
            <TabItem Header="{x:Static Internals:UIStringTable.Fill}">
                <StackPanel>
                    <GroupBox >
                       <!-- <ContentControl Content="{Binding}" ContentTemplate="{x:Static chartui:ShapedPropertiesResources.FillPropertiesTemplate}"/> 
                        -->
                        <ContentControl Content="{Binding Path=(chartui:ChartElement.ViewModel).FillFormatter, RelativeSource={RelativeSource Self}}" />

                    </GroupBox>
                </StackPanel>
            </TabItem>
            <TabItem Header="{x:Static Internals:UIStringTable.BorderColor}">
                <StackPanel>
                    <GroupBox >
                        <ContentControl Content="{Binding Path=(chartui:ChartElement.ViewModel).LineFillFormatter, RelativeSource={RelativeSource Self}}" />

<!--                        <ContentControl Content="{Binding}" ContentTemplate="{x:Static chartui:ShapedPropertiesResources.LineFillPropertiesTemplate}"/> -->
                    </GroupBox>
                </StackPanel>
            </TabItem>
            <TabItem Header="{x:Static Internals:UIStringTable.BorderStyles}">
                <StackPanel>
                    <GroupBox>
                        <StackPanel>
                            <ContentControl Content="{Binding Path=(chartui:ChartElement.ViewModel).LineStyleFormatter, RelativeSource={RelativeSource Self}}" />
                            <CheckBox Content="{x:Static Internals:UIStringTable.RoundedCorners_}" IsChecked="{Binding RoundedCorners}" />
                            </StackPanel>
                    </GroupBox>
                </StackPanel>
            </TabItem>
            <TabItem Header="{x:Static Internals:UIStringTable.Format3DRotation}" Name="view3DTab">
                <GroupBox>
                    <ContentControl Content="{Binding Path=View3D}"/>
                </GroupBox>
            </TabItem>

        </TabControl>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding Path=View3D}" Value="{x:Null}">
                <Setter Property="IsEnabled" Value="False" TargetName="view3DTab"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding Path=(chartui:PropertyElement.PropertyTabHint), RelativeSource={RelativeSource Self}, Mode=OneTime}"
                         Value="{x:Static chartui:PropertyTabHint.View3D}">
                <Setter Property="IsSelected" Value="True" TargetName="view3DTab"/>
            </DataTrigger>
        </DataTemplate.Triggers>

    </DataTemplate>
    
</ResourceDictionary>